package strategy;

import java.math.BigDecimal;

/**
 * 策略控制类
 * @param <T>
 */
public class Context<T> {
    private ICouponDiscount discount;

    public Context(ICouponDiscount discount) {
        this.discount = discount;
    }

    //策略执行方法
    public BigDecimal discount(T info,BigDecimal skuPrice){
        return this.discount.amount(info,skuPrice);
    }
}
